<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>计算1~100中可被3、5整除但不能被15整除的数的和</title>
</head>
<body>
    <script>
        let num = 0;
        for(let i = 1; i <= 100; i++){
            if(i % 3 == 0 && i % 5 == 0 && i % 15 != 0) {
                num = num + i;
            }
        }
        document.write(num);
    </script>
</body>
</html>